﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using UserControlLib.Enums;

namespace UserControlLib.Models
{
    public class SpeedGaugeModel:INotifyPropertyChanged
    {

        /// <summary>
        /// 最小值
        /// </summary>
        private int _min;
        public int Min
        {
            get { return _min; }
            set
            {
                this._min = value;
                OnPropertyChanged();
            }
        }

        /// <summary>
        /// 最大值
        /// </summary>
        private int _max;
        public int Max
        {
            get { return _max; }
            set
            {
                this._max = value;
                OnPropertyChanged();
            }
        }

        /// <summary>
        /// 显示值
        /// </summary>
        private int _valueString;
        public int ValueString
        {
            get { return _valueString; }
            set
            {
                this._valueString = value;
                OnPropertyChanged();
            }
        }

        /// <summary>
        /// 指针数据值
        /// </summary>
        private int _value;
        public int Value
        {
            get { return _value; }
            set
            {
                this._value = value;
                OnPropertyChanged();
            }
        }

        /// <summary>
        /// 标题
        /// </summary>
        private string _title;
        public string Title
        {
            get { return _title; }
            set
            {
                this._title = value;
                OnPropertyChanged();
            }
        }
        /// <summary>
        /// 单位
        /// </summary>
        private string _unit;
        public string Unit
        {
            get { return _unit; }
            set
            {
                this._unit = value;
                OnPropertyChanged();
            }
        }

        /// <summary>
        /// 倍率
        /// </summary>
        private string _tickUnit;
        public string TickUnit
        {
            get { return _tickUnit; }
            set
            {
                this._tickUnit = value;
                OnPropertyChanged();
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

    }
}
